<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p5_固定定位</title>
    <style>
        .fu{
            background-color: #ff0;
        }
        .fu>div{
            width: 100px;
            height: 100px;
        }
        .z1{
            background-color: red;
            position: relative;
            z-index:3;
        }
        .z2{
            background-color: green;
            position: fixed;
            top: 0;
            left: 0;
        }
        .z3{
            background-color: blue;
        }
    </style>
</head>
<body>
<div class="fu">
    <div class="z1">111</div>
    <div class="z2">222</div>
    <div class="z3">333</div>
</div>
</body>
</html>